package com.qsd.TeacherSystem.controller;

import com.qsd.TeacherSystem.Service.ClazzService;
import com.qsd.common.enums.ResultStatus;
import com.qsd.common.po.Clazz;
import com.qsd.common.vo.BaseVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("clazz")
public class ClazzController {
	
	@Resource
	private ClazzService clazzService;
	
	@GetMapping("removeStudent")
	public BaseVo removeStudentd(String username, Integer id) {
		if (username != null && id != null) {
			return new BaseVo(clazzService.removeStudent(new Clazz(id, username)));
		}
		return new BaseVo(ResultStatus.REQUEST_PARAM_MISS);
	}

}
